/*
 * Lenovo Group
 * Copyright (c) 2015-2016 All Rights Reserved.
 * 
 * Project Name:assign-tracer
 * Create Time: 2016年3月6日 上午10:12:49
 */
package com.lenovo.lmrp.api.constant;

/**
 * 
 * @author zx-lxj
 * @version $Id: CloseReason.java, v 0.1 2016年3月6日 上午10:12:49 zx-lxj Exp $
 */
public enum CloseReason {

    SELFSOLVE(0,"客户自行解决"),REMOTESOLVED(1,"工程师远程解决"),OUTOFSERVICE(2,"不在服务范围");
    
    private int num;
    private String descr;
    
    private CloseReason(int num,String descr){
        this.num = num;
        this.descr = descr;
    }
    
    public static CloseReason get(int num){
        for (CloseReason  cr: CloseReason.values()) {
            if(cr.num == num) return cr;
        }
        return null;
    }
    
    public String getStrReason() {
        return descr;
    }
    
    public int getIntReason() {
        return num;
    }
}
